﻿<?xml version="1.0" encoding="utf-8"?>
<Application xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:nav="clr-namespace:System.Windows.Navigation;assembly=Microsoft.Phone" xmlns:local="clr-namespace:Organizer" xmlns:Converters="clr-namespace:Organizer.ViewModel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Organizer.App" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:Organizer.ViewModel"
             xmlns:Converters1="clr-namespace:Organizer.Views.Converters"
             xmlns:UserControls="clr-namespace:Organizer.Views.UserControls" mc:Ignorable="d">
    <!--Application Resources-->
    <Application.Resources>
        <!-- Place pge mappings here to trim page name in navigation URI -->
        <nav:UriMapper x:Key="UriMapper" >
            <nav:UriMapper.UriMappings>
                <nav:UriMapping Uri="/Organizations" MappedUri="/Views/OrganizationsPage.xaml" />
                <nav:UriMapping Uri="/Tasks" MappedUri="/Views/TasksPage.xaml" />
                <nav:UriMapping Uri="/Notes" MappedUri="/Views/NotesPage.xaml" />
                <nav:UriMapping Uri="/Main" MappedUri="/Views/MainPage.xaml" />
                <nav:UriMapping Uri="/TaskEdit" MappedUri="/Views/TaskEditPage.xaml" />
                <nav:UriMapping Uri="/NoteList" MappedUri="/Views/NoteListPage.xaml" />
                <nav:UriMapping Uri="/NoteEdit" MappedUri="/Views/NoteEditPage.xaml" />
                <nav:UriMapping Uri="/CategoryList" MappedUri="/Views/CategoryListPage.xaml" />
                <nav:UriMapping Uri="/CategoryEdit" MappedUri="/Views/CategoryEditPage.xaml" />
                <nav:UriMapping Uri="/Settings" MappedUri="/Views/SettingsPage.xaml" />
                <nav:UriMapping Uri="/Mans" MappedUri="/Views/MansPage.xaml" />
                <nav:UriMapping Uri="/Start" MappedUri="/Views/StartPage.xaml" />
                <nav:UriMapping Uri="/Hub" MappedUri="/Views/HubPage.xaml" />
            </nav:UriMapper.UriMappings>
        </nav:UriMapper>
        <local:LocalizedStrings xmlns:local="clr-namespace:Organizer" x:Key="LocalizedStrings" />
        <!-- List of custon styles -->
        <Style x:Key="TitlePanelTextNormalStyle" BasedOn="{StaticResource PhoneTextNormalStyle}" TargetType="TextBlock" >
            <Setter Property="Foreground" Value="Gray" />
        </Style>
        <Style x:Key="RadioTextNormalStyle" BasedOn="{StaticResource PhoneTextNormalStyle}" TargetType="RadioButton" >
            <Setter Property="Foreground" Value="Gray" />
        </Style>
        <Style x:Key="TitlePanelTextTitle2Style" BasedOn="{StaticResource PhoneTextTitle2Style}" TargetType="TextBlock" ></Style>
        <Style x:Key="TextLighter" BasedOn="{StaticResource PhoneTextNormalStyle}" TargetType="TextBlock" >
            <Setter Property="Foreground" Value="Gray" />
            <Setter Property="Margin" Value="12 0 0 0" />
        </Style>
        <Style x:Key="CheckBoxLighter" TargetType="CheckBox">
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="FontSize" Value="18"/>
        </Style>
        <Style x:Key="TextDarkGray" BasedOn="{StaticResource PhoneTextNormalStyle}" TargetType="TextBlock" >
            <Setter Property="Foreground" Value="DarkGray" />
        </Style>
        <Style x:Key="TextLightGray" BasedOn="{StaticResource PhoneTextNormalStyle}" TargetType="TextBlock" >
            <Setter Property="Foreground" Value="LightGray" />
        </Style>
        <Style x:Key="PhoneTextAccentLargeStyle" BasedOn="{StaticResource PhoneTextAccentStyle}" TargetType="TextBlock" >
            <Setter Property="FontSize" Value="36" />
            <Setter Property="FontWeight" Value="Bold" />
        </Style>

        <!-- Converter for rss text trimming -->
        <converter:RssTextTrimmer xmlns:converter="clr-namespace:Organizer.ViewModel" x:Key="RssTextTrimmer" />
        <Converters1:BooleanVisibilityConverter  x:Key="booleanToVisibilityConverter" />
        <Converters1:EditStateToVisibilityConverter  x:Key="editStateToVisibilityConverter" />
        <Converters1:ManageSelectionStateToVisibilityConverter  x:Key="manageSelectionStateToVisibilityConverter" />
        <Converters1:NormalStateToVisibilityConverter  x:Key="normalStateToVisibilityConverter" />

        
    </Application.Resources>
    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService Launching="Application_Launching" Closing="Application_Closing" Activated="Application_Activated" Deactivated="Application_Deactivated" />
    </Application.ApplicationLifetimeObjects>
</Application>
